<template>
  <div>
    <swiper>
      <swiper-item v-for="item in banner">
        <a :href="item.link">
          <img :src="item.image" alt="" @load="imageLoad">
        </a>
      </swiper-item>
    </swiper>
  </div>
</template>
<script>
  import { Swiper, SwiperItem } from "components/common/swiper/index.js"
  export default {
    name: "HomeSwiper",
    components: {
      Swiper,
      SwiperItem
    },
    data() {
      return {
        isEmmit: false
      }
    },
    props: {
      banner: {
        type: Array,
        default() {
          return []
        }
      }
    },
    methods:{
      imageLoad() {
        if (!this.isEmmit){
          this.$emit("SwiperImageLoad")
          this.isEmmit = true
         }
      }
    }
  }
</script>
<style scoped>
  
</style>